package org.brownflat.watergate.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * <p>&copy Rupert Jones 2012</p>
 *
 * @author rup
 */
@Entity
@Table(name="wgate_review_contribution_state")
public class ReviewContributionState extends BaseEntity {

    @Column(name = "name")
    private String name;

    @ManyToOne
    @JoinColumn(name="next_state")
    private ReviewContributionState nextState;

    @ManyToOne
    @JoinColumn(name="previous_state")
    private ReviewContributionState previousState;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ReviewContributionState getNextState() {
        return nextState;
    }

    public void setNextState(ReviewContributionState nextState) {
        this.nextState = nextState;
    }

    public ReviewContributionState getPreviousState() {
        return previousState;
    }

    public void setPreviousState(ReviewContributionState previousState) {
        this.previousState = previousState;
    }
}
